<div class="page">
<?php echo $html->getTitle('cName')?>   
<div class="Contentsub">
    <?php echo $html->getContent('cIntro')?>    
</div>
<div id="bookform" style="padding: 15px;">
<form method="post" onsubmit="checkform(this); return false">
    <div style="position:relative; float: left;width:697px;margin-left:90px">
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="swflash.cab#version=6,0,29,0" align="top"
         height="722" width="697"><param name="movie" value="/styles/customtourmap.swf">
         <param name="quality" value="high"><param name="wmode" value="transparent">
         <embed src="/styles/customtourmap.swf" quality="high" wmode="transparent" 
         pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" 
         align="top" height="722" width="697"></object>
         
        <input name="loc[]" style="position: absolute; top: 73px; left: 297px;" value="Sapa" title="Sapa" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 104px; left: 252px;" value="Dien Bien Phu" title="Dien Bien Phu" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 315px; left: 448px;" value="Hue" title="Hue" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 329px; left: 468px;" value="Da Nang" title="Da Nang" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 343px; left: 474px;" value="Hoi An" title="Hoi An" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 393px; left: 444px;" value="Kontum" title="Kontum" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 432px; left: 507px;" value="Quy Nhon" title="Quy Nhon" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 493px; left: 507px;" value="Nha Trang" title="Nha Trang" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 505px; left: 466px;" value="Dalat" title="Dalat" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 541px; left: 489px;" value="Mui Ne" title="Mui Ne" type="checkbox">
        <input  name="loc[]" style="position: absolute; top: 530px; left: 370px;" value="Tay Ninh" title="Tay Ninh" type="checkbox">
        <input  name="loc[]" style="position: absolute; top: 546px; left: 401px;" value="Cu Chi" title="Cu Chi" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 567px; left: 414px;" value="Ho Chi Minh City" title="Ho Chi Minh City" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 575px; left: 374px;" value="My Tho" title="My Tho" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 591px; left: 370px;" value="Can Tho" title="Can Tho" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 569px; left: 328px;" value="Chau Doc" title="Chau Doc" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 579px; left: 302px;" value="Phu Quoc Island" title="Phu Quoc Island" type="checkbox">
        <input  name="loc[]" style="position: absolute; top: 121px; left: 377px;" value="Hanoi" title="Hanoi" type="checkbox">
        <input  name="loc[]" style="position: absolute; top: 115px; left: 424px;" value="Halong Bay" title="Halong Bay" type="checkbox">
        <input  name="loc[]" style="position: absolute; top: 134px; left: 410px;" value="Cat Ba Island" title="Cat Ba Island" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 132px; left: 337px;" value="Mai Chau" title="Mai Chau" type="checkbox">
        <input  name="loc[]" style="position: absolute; top: 145px; left: 364px;" value="Cuc Phuong" title="Cuc Phuong" type="checkbox">
        
        <input name="loc[]" style="position: absolute; top: 567px; left: 280px;" value="Sihanoukville" title="Sihanoukville" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 551px; left: 320px;" value="Kep" title="Kep" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 513px; left: 284px;" value="Phnom Penh" title="Phnom Penh" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 501px; left: 243px;" value="Koh Khong" title="Koh Khong" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 491px; left: 373px;" value="Kratie" title="Kratie" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 443px; left: 373px;" value="Stung Treng" title="Stung Treng" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 449px; left: 288px;" value="Siem Reap" title="Siem Reap" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 436px; left: 268px;" value="Angkor" title="Angkor" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 463px; left: 230px;" value="Battambang" title="Battambang" type="checkbox">
        
        <input name="loc[]" style="position: absolute; top: 130px; left: 195px;" value="Golden Triangle and Chiang Saen" title="Golden Triangle and Chiang Saen" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 151px; left: 170px;" value="Seuang River" title="Seuang River" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 159px; left: 220px;" value="Pak Ou" title="Pak Ou" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 180px; left: 234px;" value="Luang Prabang" title="Luang Prabang" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 156px; left: 290px;" value="Viengsay" title="Viengsay" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 207px; left: 197px;" value="Vang Vieng" title="Vang Vieng" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 234px; left: 213px;" value="Vientiane" title="Vientiane" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 304px; left: 362px;" value="Savannakhet" title="Savannakhet" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 370px; left: 365px;" value="Pakse" title="Pakse" type="checkbox">
        <input name="loc[]" style="position: absolute; top: 400px; left: 354px;" value="4000 Islands" title="4000 Islands" type="checkbox">
    </div>
    <div class="clear">&nbsp;</div>
    <table width="100%" style="margin-left: 10px;">
            <tbody><tr>
                <td width="36%" valign="top">
                    <b>Travel style</b>    
                    <?php
                    foreach($acts as $acttext)
                    {
                      echo '<br><input type="checkbox" value="'.$acttext['cName'].'" name="act[]"> '.$acttext['cName'];  
                    }
                    ?>                    
                </td>
                <td width="33%" valign="top">
                    <b>Accommodation Style</b>   
                    <?php
                    foreach($accs as $acctext)
                    {
                      echo '<br><input type="checkbox" value="'.$acctext['cName'].'" name="acc[]"> '.$acctext['cName'];  
                    }
                    ?>                        
                </td>
                <td width="30%" valign="top" style="padding-right: 20px;" rowspan="2">
                    <b>Name</b><br>
                    <input type="text" style="width: 250px;" id="ctl03_ctl00_txtName" name="cName"><br>
                    <b>Phone</b><br>
                    <input type="text" style="width: 250px;" id="ctl03_ctl00_txtPhone" name="cPhone"><br>
                    <b>Nationality</b><br>
                    <select style="width:255px;" id="ctl03_ctl00_ddlNationality" name="cCountry">
                        <?php echo $country->BuilOptionCountry()?>

                       </select><br>
                    <b>Travelling Date</b><br>
                    <input type="text" style="width: 250px;" id="cDatePicker" name="cDatePicker"/><br>
                    <b>Number of people</b><br>
                    <input type="text" style="width: 250px;" id="ctl03_ctl00_txtNumber" name="cNumber"/><br>
                    <b>Comments</b><br>
                    <textarea style="height: 45px; width: 250px;" id="ctl03_ctl00_txtComment" cols="20" rows="2" name="cComments"></textarea><br>
                    <input type="checkbox" checked="checked" name="ctl03$ctl00$chkNewsletter" id="ctl03_ctl00_chkNewsletter"><label for="ctl03_ctl00_chkNewsletter">Sign up for the Newsletter</label>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <input type="text" style="width: 226px;" onblur="if(this.value=='')this.value='Enter your email address';" onfocus="if(this.value=='Enter your email address')this.value='';" id="ctl03_ctl00_txtEmail" value="Enter your email address" name="cEmail">
                    <input type="submit" id="ctl03_ctl00_btnSubmit" value="Submit" name="ctl03$ctl00$btnSubmit">
                    <input type="reset" value="Reset">
                </td>
            </tr>
        </tbody>
     </table>
     </form>
</div>
<div class="clear">&nbsp;</div> 

</div>
<script>
$(function(){
	// Datepicker
	$('#cDatePicker').datepicker({
		inline: true,
        format: 'Y-m-d'
	});
});
var ajpost      = new ajaxLoader();
ajpost.init({url: '/as/insertcustomtour',func:postsuccess});

function checkform(fox)
{
	if(fox.cName.value=="")
	{
		alert("<?php echo __('Please enter your name')?>!");
		fox.cName.focus();
		return false;
	}
	if(!isEmail(fox.cEmail.value))
	{
		alert("<?php echo __('Please enter your email')?>!");
        fox.cEmail.focus();
        return false;
	}
	post='';
	for(i=0;i<200;i++)
	{
		if(fox[i])
        {
            if(fox[i].type=='checkbox' && fox[i].checked == false)continue;
            post+=fox[i].name+"="+ajpost.escapeHTML(fox[i].value)+"&";
        }			
		else break;
	}
    ajpost.send(post);
    getId('ctl03_ctl00_btnSubmit').value="<?php echo __('Sending')?>...";
}       
function postsuccess(obj)
{
    getId('ctl03_ctl00_btnSubmit').value="<?php echo __('Submit')?>";
    if(obj.status=='spam')
    {
        getId('SpamCode').value='';
        getId('imgcodespam').src = '/ImgSpam/'+Math.random()+'.jpg';        
    }
    else if(obj.status=='ok')
    {
        getId('bookform').innerHTML=obj.msg;
        return;
    }
    if(obj.msg)
    {
        alert(obj.msg);
    }else
    {
        alert(obj);
    }
    
}
</script>